From fdf10ef4b6ae6a491e299b037c1be9eeb8ec1a9f Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Wed, 26 Oct 2022 15:37:16 +1100 Subject: [PATCH] adds dynamic quotes --- package-lock.json | 13 + packages/shared-data/index.ts | 3 + packages/shared-data/package.json | 11 + packages/shared-data/tweets.ts | 262 ++++++++++++++++++ .../layouts/SignInLayout/SignInLayout.tsx | 65 +++-- studio/package.json | 1 + 6 files changed, 331 insertions(+), 24 deletions(-) create mode 100644 packages/shared-data/index.ts create mode 100644 packages/shared-data/package.json create mode 100644 packages/shared-data/tweets.ts diff --git a/package-lock.json b/package-lock.json index 417718026f3..da2ee574b3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31100,6 +31100,10 @@ "node": ">=8" } }, + "node_modules/shared-data": { + "resolved": "packages/shared-data", + "link": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -36001,6 +36005,10 @@ "version": "2.6.0", "license": "MIT" }, + "packages/shared-data": { + "version": "0.0.0", + "license": "MIT" + }, "packages/tsconfig": { "version": "0.0.0" }, @@ -36115,6 +36123,7 @@ "sass": "^1.43.4", "scheduler": "^0.20.2", "semver": "^6.3.0", + "shared-data": "*", "sqlstring": "^2.3.2", "swr": "^1.2.1", "ui": "*", @@ -59791,6 +59800,9 @@ "kind-of": "^6.0.2" } }, + "shared-data": { + "version": "file:packages/shared-data" + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -60635,6 +60647,7 @@ "sass": "^1.43.4", "scheduler": "^0.20.2", "semver": "^6.3.0", + "shared-data": "*", "sqlstring": "^2.3.2", "storybook-dark-mode": "^1.0.4", "swr": "^1.2.1", diff --git a/packages/shared-data/index.ts b/packages/shared-data/index.ts new file mode 100644 index 00000000000..d469d45cc22 --- /dev/null +++ b/packages/shared-data/index.ts @@ -0,0 +1,3 @@ +import tweets from './tweets' + +export { tweets } diff --git a/packages/shared-data/package.json b/packages/shared-data/package.json new file mode 100644 index 00000000000..0658adfdbda --- /dev/null +++ b/packages/shared-data/package.json @@ -0,0 +1,11 @@ +{ + "name": "shared-data", + "version": "0.0.0", + "description": "Data shared between Supabase apps", + "main": "./index.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT" +} diff --git a/packages/shared-data/tweets.ts b/packages/shared-data/tweets.ts new file mode 100644 index 00000000000..3b6094929bc --- /dev/null +++ b/packages/shared-data/tweets.ts @@ -0,0 +1,262 @@ +const tweets = [ + { + text: "Working with @supabase has been one of the best dev experiences I've had lately. Incredibly easy to set up, great documentation, and so many fewer hoops to jump through than the competition. I definitely plan to use it on any and all future projects.", + url: 'https://twitter.com/thatguy_tex/status/1497602628410388480', + handle: 'thatguy_tex', + img_url: '/images/twitter-profiles/09HouOSt_400x400.jpg', + }, + { + text: '@supabase is just 🤯 Now I see why a lot of people love using it as a backend for their applications. I am really impressed with how easy it is to set up an Auth and then just code it together for the frontend. @IngoKpp now I see your joy with Supabase #coding #fullstackwebdev', + url: 'https://twitter.com/IxoyeDesign/status/1497473731777728512', + handle: 'IxoyeDesign', + img_url: '/images/twitter-profiles/C8opIL-g_400x400.jpg', + }, + { + text: "I've been using @supabase for two personal projects and it has been amazing being able to use the power of Postgres and don't have to worry about the backend", + url: 'https://twitter.com/varlenneto/status/1496595780475535366', + handle: 'varlenneto', + img_url: '/images/twitter-profiles/wkXN0t_F_400x400.jpg', + }, + { + text: "Y'all @supabase + @nextjs is amazing! 🙌 Barely an hour into a proof-of-concept and already have most of the functionality in place. 🤯🤯🤯", + url: 'https://twitter.com/justinjunodev/status/1500264302749622273', + handle: 'justinjunodev', + img_url: '/images/twitter-profiles/9k_ZB9OO_400x400.jpg', + }, + { + text: 'And thanks to @supabase, I was able to go from idea to launched feature in a matter of hours. Absolutely amazing!', + url: 'https://twitter.com/BraydonCoyer/status/1511071369731137537', + handle: 'BraydonCoyer', + img_url: '/images/twitter-profiles/8YxkpW8f_400x400.jpg', + }, + { + text: 'Contributing to open-source projects and seeing merged PRs gives enormous happiness! Special thanks to @supabase, for giving this opportunity by staying open-source and being junior-friendly✌🏼', + url: 'https://twitter.com/damlakoksal/status/1511436907984662539', + handle: 'damlakoksal', + img_url: '/images/twitter-profiles/N8EfTFs7_400x400.jpg', + }, + { + text: "Holy crap. @supabase is absolutely incredible. Most elegant backend as a service I've ever used. This is a dream.", + url: 'https://twitter.com/kentherogers/status/1512609587110719488', + handle: 'KenTheRogers', + img_url: '/images/twitter-profiles/9l9Td-Fz_400x400.jpg', + }, + { + text: "Over the course of a few weeks, we migrated 125.000 users (email/pw, Gmail, Facebook, Apple logins) from Auth0 to @supabase and have now completed the migration. I'm just glad the migration is done 😅 Went well, besides a few edge cases (duplicate emails/linked accounts)", + url: 'https://twitter.com/kevcodez/status/1518548401587204096', + handle: 'kevcodez', + img_url: '/images/twitter-profiles/t6lpcRcn_400x400.jpg', + }, + { + text: "Using @supabase I'm really pleased on the power of postgres (and sql in general). Despite being a bit dubious about the whole backend as a service thing I have to say I really don't miss anything. The whole experience feel very robust and secure.", + url: 'https://twitter.com/paoloricciuti/status/1497691838597066752', + handle: 'PaoloRicciuti', + img_url: '/images/twitter-profiles/OCDKFUOp_400x400.jpg', + }, + { + text: '@supabase is lit. It took me less than 10 minutes to setup, the DX is just amazing.', + url: 'https://twitter.com/saxxone/status/1500812171063828486', + handle: 'saxxone', + img_url: '/images/twitter-profiles/BXi6z1M7_400x400.jpg', + }, + { + text: 'I’m not sure what magic @supabase is using but we’ve migrated @happyteamsdotio database to @supabase from @heroku and it’s much much faster at half the cost.', + url: 'https://twitter.com/michaelcdever/status/1524753565599690754', + handle: 'michaelcdever', + img_url: '/images/twitter-profiles/rWX8Jzp5_400x400.jpg', + }, + { + text: 'There are a lot of indie hackers building in public, but it’s rare to see a startup shipping as consistently and transparently as Supabase. Their upcoming March releases look to be 🔥 Def worth a follow! also opened my eyes as to how to value add in open source.', + url: 'https://twitter.com/swyx/status/1366685025047994373', + handle: 'swyx', + img_url: '/images/twitter-profiles/qhvO9V6x_400x400.jpg', + }, + { + text: 'This weekend I made a personal record 🥇 on the less time spent creating an application with social login / permissions, database, cdn, infinite scaling, git push to deploy and for free. Thanks to @supabase and @vercel', + url: 'https://twitter.com/jperelli/status/1366195769657720834', + handle: 'jperelli', + img_url: '/images/twitter-profiles/_ki30kYo_400x400.jpg', + }, + { + text: 'Badass Supabase is amazing, literally saves our small team a while engineer’s worth of work constantly Founders and everyone I’ve chatted with at supabase are just awesome people as well :)', + url: 'https://twitter.com/KennethCassel/status/1524359528619384834', + handle: 'KennethCassel', + img_url: '/images/twitter-profiles/pmQj3TX-_400x400.jpg', + }, + { + text: 'Working with Supabase is just fun. It makes working with a DB so much easier.', + url: 'https://twitter.com/the_BrianB/status/1524716498442276864', + handle: 'the_BrianB', + img_url: '/images/twitter-profiles/7NITI8Z3_400x400.jpg', + }, + { + text: 'This community is STRONG and will continue to be the reason why developers flock to @supabase over an alternative. Keep up the good work! ⚡️', + url: 'https://twitter.com/_wilhelm__/status/1524074865107488769', + handle: '_wilhelm__', + img_url: '/images/twitter-profiles/CvqDy6YF_400x400.jpg', + }, + { + text: "Working on my next SaaS app and I want this to be my whole job because I'm just straight out vibing putting it together. @supabase and chill, if you will", + url: 'https://twitter.com/drewclemcr8/status/1523843155484942340', + handle: 'drewclemcr8', + img_url: '/images/twitter-profiles/bJlKtSxz_400x400.jpg', + }, + { + text: '@supabase Putting a ton of well-explained example API queries in a self-building documentation is just a classy move all around. I also love having GraphQL-style nested queries with traditional SQL filtering. This is pure DX delight. A+++. #backend', + url: 'https://twitter.com/CodiferousCoder/status/1522233113207836675', + handle: 'CodiferousCoder', + img_url: '/images/twitter-profiles/t37cVLwy_400x400.jpg', + }, + { + text: 'Me using @supabase for the first time right now 🤯', + url: 'https://twitter.com/nasiscoe/status/1365140856035024902', + handle: 'nasiscoe', + img_url: '/images/twitter-profiles/nc2Ms5hH_400x400.jpg', + }, + { + text: "I'm trying @supabase, Firebase alternative that uses PostgreSQL (and you can use GraphQL too) in the cloud. It's incredible 😍", + url: 'https://twitter.com/JP__Gallegos/status/1365699468109242374', + handle: 'JP__Gallegos', + img_url: '/images/twitter-profiles/1PH2mt6v_400x400.jpg', + }, + { + text: 'Check out this amazing product @supabase. A must give try #newidea #opportunity', + url: 'https://twitter.com/digitaldaswani/status/1364447219642814464', + handle: 'digitaldaswani', + img_url: '/images/twitter-profiles/w8HLdlC7_400x400.jpg', + }, + { + text: "I gave @supabase a try this weekend and I was able to create a quick dashboard to visualize the data from the PostgreSQL instance. It's super easy to use Supabase's API or the direct DB connection. Check out the tutorial 📖", + url: 'https://twitter.com/razvanilin/status/1363770020581412867', + handle: 'razvanilin', + img_url: '/images/twitter-profiles/AiaH9vJ2_400x400.jpg', + }, + { + text: "Tried @supabase for the first time yesterday. Amazing tool! I was able to get my Posgres DB up in no time and their documentation on operating on the DB is super easy! 👏 Can't wait for Cloud functions to arrive! It's gonna be a great Firebase alternative!", + url: 'https://twitter.com/chinchang457/status/1363347740793524227', + handle: 'chinchang457', + img_url: '/images/twitter-profiles/LTw5OCnv_400x400.jpg', + }, + { + text: '10/100 All day i was migrating my project from firebase to @supabase Because it is perfect and simple!!! I like design and API for understandable. There are in BETA now. Just try!🧪', + url: 'https://twitter.com/roomahhka/status/1363155396391763971', + handle: 'roomahhka', + img_url: '/images/twitter-profiles/e_2eQt6C_400x400.jpg', + }, + { + text: 'I gave @supabase a try today and I was positively impressed! Very quick setup to get a working remote database with API access and documentation generated automatically for you 👌 10/10 will play more', + url: 'https://twitter.com/razvanilin/status/1363002398738800640', + handle: 'razvanilin', + img_url: '/images/twitter-profiles/AiaH9vJ2_400x400.jpg', + }, + { + text: "Wait. Is it so easy to write queries for @supabase ? It's like simple SQL stuff!", + url: 'https://twitter.com/T0ny_Boy/status/1362911838908911617', + handle: 'T0ny_Boy', + img_url: '/images/twitter-profiles/UCBhUBZl_400x400.jpg', + }, + { + text: 'Jeez, and @supabase have native support for magic link login?! I was going to use http://magic.link for this But if I can get my whole DB + auth + magic link support in one... Awesome', + url: 'https://twitter.com/louisbarclay/status/1362016666868154371', + handle: 'louisbarclay', + img_url: '/images/twitter-profiles/6f1O8ZOW_400x400.jpg', + }, + { + text: "@MongoDB or @MySQL?!?! Please, let me introduce you to @supabase and the wonderful world of @PostgreSQL before it's too late!!", + url: 'https://twitter.com/jim_bisenius/status/1361772978841788416', + handle: 'jim_bisenius', + img_url: '/images/twitter-profiles/rLgwUZSB_400x400.jpg', + }, + { + text: 'Where has @supabase been all my life? 😍', + url: 'https://twitter.com/Elsolo244/status/1360257201911320579', + handle: 'Elsolo244', + img_url: '/images/twitter-profiles/v6citnk33y2wpeyzrq05_400x400.jpeg', + }, + { + text: 'Honestly Supabase is such a killer Firebase alternative.', + url: 'https://twitter.com/XPCheese/status/1360229397735895043', + handle: 'XPCheese', + img_url: '/images/twitter-profiles/eYP6YXr7_400x400.jpg', + }, + { + text: "I think you'll love @supabase :-) Open-source, PostgreSQL-based & zero magic.", + url: 'https://twitter.com/zippoxer/status/1360021315852328961', + handle: 'zippoxer', + img_url: '/images/twitter-profiles/6rd3xub9_400x400.png', + }, + { + text: '@supabase is the answer to all of firebase’s problems imo', + url: 'https://twitter.com/jim_bisenius/status/1358590362953142278', + handle: 'jim_bisenius', + img_url: '/images/twitter-profiles/rLgwUZSB_400x400.jpg', + }, + { + text: '@supabase is insane.', + url: 'https://twitter.com/codewithbhargav/status/1357647840911126528', + handle: 'codewithbhargav', + img_url: '/images/twitter-profiles/LQYfHXBp_400x400.jpg', + }, + { + text: 'It’s fun, feels lightweight, and really quick to spin up user auth and a few tables. Almost too easy! Highly recommend.', + url: 'https://twitter.com/nerdburn/status/1356857261495214085', + handle: 'nerdburn', + img_url: '/images/twitter-profiles/66VSV9Mm_400x400.png', + }, + { + text: 'I’m probably the wrong person to ask because I pick tools based on UX. Supabase was immediately approachable: instant setup, fast web app, auth, and easy APIs. Same reason I liked Firebase when I first discovered.', + url: 'https://twitter.com/jasonbarone/status/1357015483619422210', + handle: 'jasonbarone', + img_url: '/images/twitter-profiles/6zCnwpvi_400x400.jpg', + }, + { + text: 'Now things are starting to get interesting! Firebase has long been the obvious choice for many #flutter devs for the ease of use. But their databases are NoSQL, which has its downsides... Seems like @supabase is working on something interesting here!', + url: 'https://twitter.com/RobertBrunhage/status/1356973695865085953', + handle: 'RobertBrunhage', + img_url: '/images/twitter-profiles/5LMWEACf_400x400.jpg', + }, + { + text: "Honestly, I really love what @supabase is doing, you don't need to own a complete backend, just write your logic within your app and you'll get a powerful Postgresql at your disposal.", + url: 'https://twitter.com/NavicsteinR/status/1356927229217959941', + handle: 'NavicsteinR', + img_url: '/images/twitter-profiles/w_zNZAs7_400x400.jpg', + }, + { + text: 'Next.js, @supabase, @stripe, and @vercel. Supastack™', + url: 'https://twitter.com/jasonbarone/status/1356765411832922115', + handle: 'jasonbarone', + img_url: '/images/twitter-profiles/6zCnwpvi_400x400.jpg', + }, + { + text: "I've really enjoyed the DX! Extremely fun to use, which is odd to say about a database at least for me.", + url: 'https://twitter.com/Soham_Asmi/status/1373086068132745217', + handle: 'Soham_Asmi', + img_url: '/images/twitter-profiles/Os4nhKIr_400x400.jpg', + }, + { + text: 'Supabase team is doing some awesome stuff #supabase #facts @supabase', + url: 'https://twitter.com/_strawbird/status/1372607500499841025', + handle: '_strawbird', + img_url: '/images/twitter-profiles/iMBvvQdn_400x400.jpg', + }, + { + text: "Did a website with @supabase last week with no prior experience with it. Up and running in 20 minutes. It's awesome to use. Thumbs up", + url: 'https://twitter.com/michael_webdev/status/1352885366928404481?s=20', + handle: 'michael_webdev', + img_url: '/images/twitter-profiles/SvAyLaWV_400x400.jpg', + }, + { + text: 'Next.js, @supabase, @stripe, and @vercel. Supastack™', + url: 'https://twitter.com/jasonbarone/status/1356765411832922115?s=20', + handle: 'jasonbarone', + img_url: '/images/twitter-profiles/6zCnwpvi_400x400.jpg', + }, + { + text: 'I just learned about @supabase and im in love 😍 Supabase is an open source Firebase alternative! EarListen (& react) to database changes 💁 Manage users & permissions 🔧 Simple UI for database interaction', + url: 'https://twitter.com/0xBanana/status/1373677301905362948', + handle: '0xBanana', + img_url: '/images/twitter-profiles/pgHIGqZ0_400x400.jpg', + }, +] + +export default tweets diff --git a/studio/components/layouts/SignInLayout/SignInLayout.tsx b/studio/components/layouts/SignInLayout/SignInLayout.tsx index 0ab8434cd17..d9d0bc42c9e 100644 --- a/studio/components/layouts/SignInLayout/SignInLayout.tsx +++ b/studio/components/layouts/SignInLayout/SignInLayout.tsx @@ -4,7 +4,8 @@ import { observer } from 'mobx-react-lite' import Head from 'next/head' import Image from 'next/image' import Link from 'next/link' -import { PropsWithChildren, useEffect } from 'react' +import { PropsWithChildren, useEffect, useState } from 'react' +import { tweets } from 'shared-data' type SignInLayoutProps = { heading: string @@ -37,6 +38,19 @@ const SignInLayout = ({ })() }, []) + const [quote, setQuote] = useState<{ + text: string + url: string + handle: string + img_url: string + } | null>(null) + + useEffect(() => { + const randomQuote = tweets[Math.floor(Math.random() * tweets.length)] + + setQuote(randomQuote) + }, []) + return ( <> @@ -105,31 +119,34 @@ const SignInLayout = ({ diff --git a/studio/package.json b/studio/package.json index 1b9790d0711..de7e56d817d 100644 --- a/studio/package.json +++ b/studio/package.json @@ -77,6 +77,7 @@ "sass": "^1.43.4", "scheduler": "^0.20.2", "semver": "^6.3.0", + "shared-data": "*", "sqlstring": "^2.3.2", "swr": "^1.2.1", "ui": "*",