-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
48 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use client'; | ||
import WebsiteList from 'app/(app)/settings/websites/WebsitesList'; | ||
import { useMessages } from 'components/hooks'; | ||
import { useState } from 'react'; | ||
import { Item, Tabs } from 'react-basics'; | ||
|
||
const TABS = { | ||
myWebsites: 'my-websites', | ||
teamWebsites: 'team-websites', | ||
}; | ||
|
||
export function WebsitesBrowse() { | ||
const { formatMessage, labels } = useMessages(); | ||
const [tab, setTab] = useState(TABS.myWebsites); | ||
|
||
return ( | ||
<> | ||
<Tabs selectedKey={tab} onSelect={setTab} style={{ marginBottom: 30 }}> | ||
<Item key={TABS.myWebsites}>{formatMessage(labels.myWebsites)}</Item> | ||
<Item key={TABS.teamWebsites}>{formatMessage(labels.teamWebsites)}</Item> | ||
</Tabs> | ||
{tab === TABS.myWebsites && <WebsiteList showHeader={false} />} | ||
{tab === TABS.teamWebsites && ( | ||
<WebsiteList showHeader={false} showTeam={true} onlyTeams={true} /> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default WebsitesBrowse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import WebsiteDetails from './WebsiteDetails'; | ||
|
||
export default function ({ params: { id } }) { | ||
if (!id) { | ||
return null; | ||
} | ||
|
||
export default function WebsiteReportsPage({ params: { id } }) { | ||
return <WebsiteDetails websiteId={id} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,12 @@ | ||
'use client'; | ||
import WebsiteList from 'app/(app)/settings/websites/WebsitesList'; | ||
import { useMessages } from 'components/hooks'; | ||
import { useState } from 'react'; | ||
import { Item, Tabs } from 'react-basics'; | ||
import WebsitesHeader from '../settings/websites/WebsitesHeader'; | ||
|
||
const TABS = { | ||
myWebsites: 'my-websites', | ||
teamWebsites: 'team-websites', | ||
}; | ||
import WebsitesBrowse from './WebsitesBrowse'; | ||
|
||
export default function WebsitesPage() { | ||
const { formatMessage, labels } = useMessages(); | ||
const [tab, setTab] = useState(TABS.myWebsites); | ||
|
||
return ( | ||
<> | ||
<WebsitesHeader /> | ||
<Tabs selectedKey={tab} onSelect={setTab} style={{ marginBottom: 30 }}> | ||
<Item key={TABS.myWebsites}>{formatMessage(labels.myWebsites)}</Item> | ||
<Item key={TABS.teamWebsites}>{formatMessage(labels.teamWebsites)}</Item> | ||
</Tabs> | ||
{tab === TABS.myWebsites && <WebsiteList showHeader={false} />} | ||
{tab === TABS.teamWebsites && ( | ||
<WebsiteList showHeader={false} showTeam={true} onlyTeams={true} /> | ||
)} | ||
<WebsitesBrowse /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import Share from './Share'; | ||
|
||
export default function ({ params: { id } }) { | ||
if (!id) { | ||
return null; | ||
} | ||
|
||
return <Share shareId={id} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters