Skip to content
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

feat: markdown, link click support, and project view for hackathon projects #877

Merged
merged 12 commits into from
Oct 28, 2021
2 changes: 1 addition & 1 deletion packages/hackathon/src/components/Header/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { Header } from './Header'
export * from './Header'
2 changes: 1 addition & 1 deletion packages/hackathon/src/components/Loading/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.
*/
export { Loading } from './Loading'
export * from './Loading'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { MoreInfoDialog } from './MoreInfoDialog'
export * from './MoreInfoDialog'
2 changes: 1 addition & 1 deletion packages/hackathon/src/components/Scroller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { Scroller } from './Scroller'
export * from './Scroller'
6 changes: 3 additions & 3 deletions packages/hackathon/src/components/SideNav/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import type { FC } from 'react'
import React from 'react'
import styled from 'styled-components'
import { Box, MenuList, MenuItem } from '@looker/components'
import { Box2, MenuList, MenuItem } from '@looker/components'
import { Beaker } from '@looker/icons'
import { Map } from '@styled-icons/material/Map'
import { Settings } from '@styled-icons/material/Settings'
Expand All @@ -41,7 +41,7 @@ export interface SideNavProps {
}

export const SideNav: FC<SideNavProps> = ({ authorizedRoutes }) => (
<Box fontSize="xxlarge" mt="40px">
<Box2 fontSize="xxlarge" mt="40px">
<MenuList type="none">
{authorizedRoutes.includes(Routes.HOME) && (
<MenuItem icon={<Home />}>
Expand Down Expand Up @@ -74,7 +74,7 @@ export const SideNav: FC<SideNavProps> = ({ authorizedRoutes }) => (
</MenuItem>
)}
</MenuList>
</Box>
</Box2>
)

const Link = styled(NavLink)`
Expand Down
2 changes: 1 addition & 1 deletion packages/hackathon/src/components/SideNav/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.
*/
export { SideNav } from './SideNav'
export * from './SideNav'
9 changes: 8 additions & 1 deletion packages/hackathon/src/data/projects/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ import { getCurrentProjectsState, getIsProjectMemberState } from './selectors'
const createNewProject = (): IProjectProps => {
const newProject: unknown = {
title: '',
description: '',
description: `<Put a project overview here. Should be at least one paragraph.>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to update/tweak this template. This is what shows up for a new project in the Description field

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internationalize?


Team name: **My fabulous team**
- Pre-recorded [demo video link](https://youtube.com) (preferably youtube)
- Working [demo](https://looker.com) (optional). Provide any relevant start-up instructions for someone to run the demo.
- Links to any other [supporting resources](https://docs.google.com) (slides, images, etc.) (preferably google slides and imgur)
- Add your pictures/screenshots of your team hacking to the [Hack@Home 2021 shared folder](https://tbd). Create your own team folder inside it if you'd like!
`,
project_type: 'Open',
contestant: false,
locked: false,
Expand Down
8 changes: 8 additions & 0 deletions packages/hackathon/src/routes/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ import {
ProjectEditorScene,
ResourceScene,
} from '../scenes'
import { ProjectViewScene } from '../scenes/ProjectViewScene'
export enum Routes {
HOME = '/home',
ADMIN = '/admin',
JUDGING = '/judging',
EDIT_JUDGING = '/judging/:id',
PROJECTS = '/projects',
VIEW_PROJECT = '/projectview/:id',
CREATE_PROJECT = '/projects/new',
EDIT_PROJECT = '/projects/:id',
USERS = '/users',
Expand All @@ -65,6 +67,7 @@ export const getAuthorizedRoutes = (
if (hacker) {
if (currentHackathon) {
authorizedRoutes.push(Routes.PROJECTS)
authorizedRoutes.push(Routes.VIEW_PROJECT)
authorizedRoutes.push(Routes.CREATE_PROJECT)
authorizedRoutes.push(Routes.EDIT_PROJECT)
if (hacker.canAdmin || hacker.canJudge || hacker.canStaff) {
Expand Down Expand Up @@ -132,6 +135,11 @@ export const AppRouter: FC<AppRouterProps> = ({ authorizedRoutes, hacker }) => (
<ProjectEditorScene />
</Route>
)}
{authorizedRoutes.includes(Routes.VIEW_PROJECT) && (
<Route path={Routes.VIEW_PROJECT} exact>
<ProjectViewScene />
</Route>
)}
{authorizedRoutes.includes(Routes.USERS) && (
<Route path={Routes.USERS}>
<UsersScene />
Expand Down
2 changes: 1 addition & 1 deletion packages/hackathon/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.
*/
export { AppRouter, getAuthorizedRoutes } from './AppRouter'
export * from './AppRouter'
2 changes: 1 addition & 1 deletion packages/hackathon/src/scenes/AdminScene/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.
*/
export { AdminScene } from './AdminScene'
export * from './AdminScene'
2 changes: 1 addition & 1 deletion packages/hackathon/src/scenes/HomeScene/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { HomeScene } from './HomeScene'
export * from './HomeScene'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { JudgingForm } from './JudgingForm'
export * from './JudgingForm'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.
*/
export { JudgingEditorScene } from './JudgingEditorScene'
export * from './JudgingEditorScene'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { JudgingList } from './JudgingList'
export * from './JudgingList'
2 changes: 1 addition & 1 deletion packages/hackathon/src/scenes/JudgingScene/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { JudgingScene } from './JudgingScene'
export * from './JudgingScene'
2 changes: 1 addition & 1 deletion packages/hackathon/src/scenes/NotFoundScene/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE.

*/
export { NotFoundScene } from './NotFoundScene'
export * from './NotFoundScene'
Loading