Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
seng513-202401-group-13
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Junyi Li
seng513-202401-group-13
Commits
49378959
Commit
49378959
authored
1 year ago
by
kaiantwari1
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of
https://csgit.ucalgary.ca/junyi.li/seng513-202401-group-13
parents
6f8e45ca
b5ec518c
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/pages/view-community.js
+20
-12
20 additions, 12 deletions
client/pages/view-community.js
with
20 additions
and
12 deletions
client/pages/view-community.js
+
20
−
12
View file @
49378959
...
...
@@ -3,29 +3,37 @@ import React, { useState } from 'react'
import
Banner
from
'
../components/Banner
'
import
Navbar
from
'
../components/Navbar
'
import
Footer
from
'
../components/Footer
'
import
CommunityTable
from
'
../components/CommunityTable
'
//Imports the CommunityTable component
import
AddEditWindow
from
'
../components/AddEditWindow
'
import
'
../styles/addedit.module.css
'
export
default
function
ViewCommunity
()
{
const
[
showWindow
,
setShowWindow
]
=
useState
(
""
);
const
openAdd
=
()
=>
setShowWindow
(
"
add
"
)
const
openEdit
=
()
=>
setShowWindow
(
"
edit
"
)
const
closeWindow
=
()
=>
setShowWindow
(
""
)
const
openAdd
=
()
=>
setShowWindow
(
"
add
"
);
const
openEdit
=
()
=>
setShowWindow
(
"
edit
"
);
const
closeWindow
=
()
=>
setShowWindow
(
""
);
const
communities
=
[
{
id
:
1
,
name
:
'
Community 1
'
,
description
:
'
Description 1
'
,
dataTypes
:
[
'
Type A
'
,
'
Type B
'
],
index
:
1
},
{
id
:
2
,
name
:
'
Community 2
'
,
description
:
'
Description 2
'
,
dataTypes
:
[
'
Type C
'
,
'
Type D
'
],
index
:
2
},
];
return
(
<
div
class
=
"
z-0
"
>
<
div
class
Name
=
"
z-0
"
>
<
Banner
title
=
"
View Community
"
/>
<
div
style
=
{{
background
:
"
#3E415C
"
,
minHeight
:
"
80vh
"
}}
className
=
'
p-3
'
>
<
Navbar
/>
<
div
className
=
'
row mx-5
'
>
<
p
className
=
'
col-md-10 mt-4
'
>
This
is
a
placeholder
page
.
Content
will
be
added
here
by
@
Charan
.
<
/p
>
<
div
className
=
'
col-md-10 mt-4
'
>
{
/* Render the CommunityTable component and pass the communities data */
}
<
CommunityTable
communities
=
{
communities
}
/
>
<
/div
>
<
div
className
=
"
col-md-2 mt-4
"
>
<
button
onClick
=
{
openAdd
}
>
Add
Data
<
/button
>
<
button
onClick
=
{
openEdit
}
>
Edit
Data
<
/button
>
<
/div
>
<
/div
>
{
showWindow
?
<
AddEditWindow
state
=
{
showWindow
}
close
=
{
closeWindow
}
/> : null
}
<
/div
>
<
Footer
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment