Skip to content

Commit

Permalink
feature: add join community page (#64)
Browse files Browse the repository at this point in the history
* feature: add join community page

* style: format coding style
  • Loading branch information
JohnsonMao committed Jul 21, 2024
1 parent 2ee4506 commit 8536169
Show file tree
Hide file tree
Showing 8 changed files with 307 additions and 57 deletions.
7 changes: 1 addition & 6 deletions components/Home/Group/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ const Group = () => {
>
<Button
variant="outlined"
onClick={() =>
window.open(
'https://www.facebook.com/groups/2237666046370459',
'_blank',
)
}
onClick={() => router.push('/join')}
sx={{ margin: '0 10px' }}
>
<FacebookRounded sx={{ margin: '5px 0' }} />
Expand Down
71 changes: 38 additions & 33 deletions constants/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,25 +226,25 @@ export const NAV_LINK = [
link: '/group',
target: '_self',
},
{
name: '找活動',
link: '/activities',
target: '_self',
},
// {
// name: '找活動',
// link: '/activities',
// target: '_self',
// },
{
name: '找故事',
link: 'https://blog.daoedu.tw',
target: '_blank',
},
{
name: '找場域',
link: '/locations',
target: '_self',
},
// {
// name: '找場域',
// link: '/locations',
// target: '_self',
// },
{
name: '加入社群',
link: 'https://www.facebook.com/groups/2237666046370459',
target: '_blank',
link: '/join',
target: '_self',
},
// {
// name: '找學習空間',
Expand All @@ -268,21 +268,21 @@ export const NAV_LINK_MOBILE = [
link: '/group',
target: '_self',
},
{
name: '找活動',
link: '/activities',
target: '_self',
},
// {
// name: '找活動',
// link: '/activities',
// target: '_self',
// },
{
name: '找故事',
link: 'https://blog.daoedu.tw',
target: '_blank',
},
{
name: '找場域',
link: '/locations',
target: '_self',
},
// {
// name: '找場域',
// link: '/locations',
// target: '_self',
// },
{
name: '新增資源',
link: '/contribute/resource',
Expand All @@ -295,8 +295,8 @@ export const NAV_LINK_MOBILE = [
},
{
name: '加入社群',
link: 'https://www.facebook.com/groups/2237666046370459',
target: '_blank',
link: '/join',
target: '_self',
},
// {
// name: '找學習空間',
Expand All @@ -316,19 +316,24 @@ export const FOOTER_LINK = [
target: '_self',
},
{
name: '找活動',
link: '/activities',
target: '_self',
},
{
name: '找場域',
link: '/locations',
name: '找揪團',
link: '/group',
target: '_self',
},
// {
// name: '找活動',
// link: '/activities',
// target: '_self',
// },
// {
// name: '找場域',
// link: '/locations',
// target: '_self',
// },
{
name: '加入社群',
link: 'https://www.facebook.com/groups/2237666046370459',
target: '_blank',
link: '/join',
target: '_self',
},
{
name: '隱私權政策',
Expand Down
20 changes: 11 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ module.exports = withPWA({
env: {
HOSTNAME: 'https://www.daoedu.tw',
},
...(isDev ? {
async rewrites() {
return [
{
source: '/dev-proxy-api/:path*',
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
...(isDev
? {
async rewrites() {
return [
{
source: '/dev-proxy-api/:path*',
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
},
];
},
];
},
} : {})
}
: {}),
// async redirects() {
// return [
// {
Expand Down
10 changes: 1 addition & 9 deletions pages/404.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,7 @@ const NotExistPage = () => {
margin: '20px 0',
}}
>
<Button
variant="outlined"
onClick={() =>
open(
'https://www.facebook.com/groups/2237666046370459',
'_blank',
)
}
>
<Button variant="outlined" onClick={() => router.push('/join')}>
<FacebookRounded sx={{ margin: '5px 0' }} />
<Typography variant="p">加入社群</Typography>
</Button>
Expand Down
Loading

0 comments on commit 8536169

Please sign in to comment.