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

Custom URL generator #46

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Custom URL generator #46

wants to merge 22 commits into from

Conversation

riyajain59
Copy link
Contributor

@riyajain59 riyajain59 commented Mar 26, 2022

Status:

🚀 Ready

Description

Generate a custom URL that saves settings of the clock. The settings include the language, whether the ticker shows up, and the different lifelines.

Fixes #17

Todos

  • Combine all settings into one JSON object
  • Call stringify on object
  • Use lz-string to compress the data for the URL
  • Decompress the string to convert the data back to show up on the URL

Deadline (from the issue)

Screenshots

@vercel
Copy link

vercel bot commented Mar 26, 2022

@riyajain59 is attempting to deploy a commit to a Personal Account on Vercel that is not owned by them.

In order for the commit to be deployed, @riyajain59 must be granted access to the connected Vercel project.

If you're the owner of the Personal Account, transfer the project to a Vercel Team and start collaborating, or learn more.

@vercel
Copy link

vercel bot commented Apr 9, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

climate-clock – ./

🔍 Inspect: https://vercel.com/hack4impact/climate-clock/HYrttUudBPTup4PvkPG1AfiXnWSq
✅ Preview: https://climate-clock-git-url-generator-hack4impact1.vercel.app

@riyajain59 riyajain59 changed the title Draft PR Custom URL generator Apr 13, 2022
@riyajain59 riyajain59 marked this pull request as ready for review April 13, 2022 00:10
@vercel
Copy link

vercel bot commented Apr 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
climate-clock ✅ Ready (Inspect) Visit Preview Jun 26, 2022 at 5:10AM (UTC)

Copy link
Contributor

@eeshabarua eeshabarua left a comment

Choose a reason for hiding this comment

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

Yayyy this looks awesome Riya!! Just a couple small things and you're golden.

@@ -1,6 +1,7 @@
import { useState } from 'react'
import { WindowSize } from '@reach/window-size'
import { ThemeProvider } from 'styled-components'
// import { get } from './api/config'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment necessary?

return (
<ThemeProvider theme={theme}>
<FullScreen
handle={handle}
onChange={() => setFullscreenButton(!showFullscreenButton)}
>
{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

also the space, i just may not be familiar with the syntax though

Copy link
Collaborator

Choose a reason for hiding this comment

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

This gets added by the linter sometimes but it should be removed

@@ -15,7 +17,8 @@ export default function Home() {
)
const [newsfeedModules, setNewsfeedModules] = useState<NewsInterface[]>([])
const [errorFlag, setErrorFlag] = useState<boolean>(false)

const navigate = useNavigate()
//localStorage.getItem(LANGUAGE_LOCAL_STORAGE_KEY),localStorage.getItem(LIFELINES_LOCAL_STORAGE_KEY)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this comment necessary?

Copy link
Collaborator

@daniel-moon32 daniel-moon32 left a comment

Choose a reason for hiding this comment

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

Code looks good but, it looks like your changes break the website currently (check the vercel deployment to see what I'm referring to). It seem like not adding the url at the end will null is breaking the code.

return (
<ThemeProvider theme={theme}>
<FullScreen
handle={handle}
onChange={() => setFullscreenButton(!showFullscreenButton)}
>
{' '}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This gets added by the linter sometimes but it should be removed

@@ -52,6 +60,18 @@ const LifelineCreationForm = () => {
*/
const formSubmit = (e: any) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would recommend against using the any type since it is both bad practice and the linter will complain about this in the future

@daniel-moon32
Copy link
Collaborator

Bugs:

  1. Replaces entire url instead of just slug whenever redirecting to other pages
  2. decompressing does not work from slug
  3. compression works to slug

@netlify
Copy link

netlify bot commented Aug 14, 2022

Deploy Preview for stunning-cocada-f3d6ad failed.

Name Link
🔨 Latest commit 09d6957
🔍 Latest deploy log https://app.netlify.com/sites/stunning-cocada-f3d6ad/deploys/62f98405a446cf00081b935b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom clock url generator
3 participants