Skip to content

refactor(site): Refactor workspace schedule page #7069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 11, 2023
Merged
Prev Previous commit
Next Next commit
Fix sidebar link
  • Loading branch information
BrunoQuaresma committed Apr 10, 2023
commit 29cd7aab509947f6601e34e643e36ab2ce146050
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const WorkspaceSchedule: FC<
<Link
className={styles.scheduleAction}
component={RouterLink}
to={`/@${workspace.owner_name}/${workspace.name}/schedule`}
to={`/@${workspace.owner_name}/${workspace.name}/settings/schedule`}
>
{Language.editScheduleLink}
</Link>
Expand Down
7 changes: 5 additions & 2 deletions site/src/pages/WorkspaceSettingsPage/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ const SidebarNavItemIcon: React.FC<{ icon: ElementType }> = ({
return <Icon className={styles.sidebarNavItemIcon} />
}

export const Sidebar: React.FC<{ workspace: Workspace }> = ({ workspace }) => {
export const Sidebar: React.FC<{ username: string; workspace: Workspace }> = ({
username,
workspace,
}) => {
const styles = useStyles()

return (
Expand All @@ -50,7 +53,7 @@ export const Sidebar: React.FC<{ workspace: Workspace }> = ({ workspace }) => {
>
<Avatar src={workspace.template_icon} variant="square" fitImage />
<Stack spacing={0} className={styles.workspaceData}>
<Link className={styles.name} to={`/workspaces/${workspace.name}`}>
<Link className={styles.name} to={`/@${username}/${workspace.name}`}>
{workspace.name}
</Link>
<span className={styles.secondary}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const WorkspaceSettingsLayout: FC = () => {
<WorkspaceSettingsContext.Provider value={settings}>
<Margins>
<Stack className={styles.wrapper} direction="row" spacing={10}>
<Sidebar workspace={settings.workspace} />
<Sidebar workspace={settings.workspace} username={username} />
<Suspense fallback={<Loader />}>
<main className={styles.content}>
<Outlet />
Expand Down