Merge pull request #13306 from supabase/delete-default-button

Delete temp-community-forum and temp-community-tutorials and default button in common folder
This commit is contained in:
Isaiah Hamilton authored and GitHub committed 2023-04-03 00:21:02 -04:00
commit 762fc351cf
25 files changed
-343

No files matched your search

-1
View File
@@ -1 +0,0 @@
module.exports = require('config/eslint-preset')
-30
View File
@@ -1,30 +0,0 @@
## Getting Started
First, run the development server:
```bash
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
-5
View File
@@ -1,5 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
-5
View File
@@ -1,5 +0,0 @@
const withTM = require('next-transpile-modules')(['common'])
module.exports = withTM({
reactStrictMode: true,
})
-30
View File
@@ -1,30 +0,0 @@
{
"name": "forum",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev --port 3002",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@octokit/graphql": "^4.8.0",
"colorette": "^1.4.0",
"common": "*",
"next": "12.0.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"string-hash": "^1.1.3"
},
"devDependencies": {
"@types/node": "^17.0.12",
"@types/react": "17.0.37",
"config": "*",
"eslint": "7.32.0",
"mini-svg-data-uri": "^1.4.4",
"next-transpile-modules": "9.0.0",
"tsconfig": "*",
"typescript": "^4.5.3"
}
}
@@ -1 +0,0 @@
module.exports = require('config/postcss.config')
@@ -1,9 +0,0 @@
import React from 'react'
import Main from '.'
import '../styles/tailwind.css'
const Index = () => {
return <Main />
}
export default Index
@@ -1,35 +0,0 @@
import { fetchDiscussions } from '../utils/api'
import { Button, Layouts } from 'common'
import { useEffect, useState } from 'react'
export default function Main() {
const [discussionList, setDiscussionList] = useState([] as any[])
useEffect(() => {
async function fetchData() {
const discussions = await fetchDiscussions()
setDiscussionList(discussions)
}
fetchData()
}, [])
return (
<Layouts.SidebarLayout
sidebarContent={
<div className="p-4 text-white">
<div className="text-sm uppercase">Categories</div>
<div>One</div>
<div>Two</div>
</div>
}
>
<h1 className="text-2xl font-semibold text-gray-900">Discussions</h1>
{discussionList.map((x) => (
<div className="pb-4">
<h2 className="text-lg font-semibold">{x.title}</h2>
<p>{x.body}</p>
</div>
))}
</Layouts.SidebarLayout>
)
}
@@ -1,3 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@@ -1,45 +0,0 @@
import { graphql } from '@octokit/graphql'
const query = `
{
repository(owner: "supabase", name: "supabase") {
discussions(first: 10) {
nodes {
id
author {
avatarUrl
url
login
}
body
title
answer {
author {
avatarUrl
login
}
body
createdAt
}
createdAt
}
totalCount
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
}
`
export async function fetchDiscussions() {
// @ts-ignore
const { repository } = await graphql(query, {
headers: {
authorization: `token ${process.env.NEXT_PUBLIC_DISCUSSIONS_TOKEN}`,
},
})
return repository.discussions.nodes
}
@@ -1 +0,0 @@
module.exports = require('config/tailwind.config')
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
@@ -1 +0,0 @@
module.exports = require('config/eslint-preset')
-30
View File
@@ -1,30 +0,0 @@
## Getting Started
First, run the development server:
```bash
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
-5
View File
@@ -1,5 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
@@ -1,5 +0,0 @@
const withTM = require('next-transpile-modules')(['common'])
module.exports = withTM({
reactStrictMode: true,
})
@@ -1,27 +0,0 @@
{
"name": "tutorials",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev --port 3003",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"colorette": "^1.4.0",
"common": "*",
"next": "12.0.8",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@types/node": "^17.0.12",
"@types/react": "17.0.37",
"config": "*",
"eslint": "7.32.0",
"next-transpile-modules": "9.0.0",
"tsconfig": "*",
"typescript": "^4.5.3"
}
}
@@ -1 +0,0 @@
module.exports = require('config/postcss.config')
@@ -1,9 +0,0 @@
import React from 'react'
import Main from '.'
import '../styles/tailwind.css'
const Index = () => {
return <Main />
}
export default Index
@@ -1,27 +0,0 @@
import { fetchPosts, DevPost } from '../utils/api'
import { Button, Layouts } from 'common'
import { useEffect, useState } from 'react'
export default function Main() {
const [postList, setPostList] = useState([] as DevPost[])
useEffect(() => {
async function fetchData() {
const posts = await fetchPosts()
setPostList(posts)
}
fetchData()
}, [])
return (
<Layouts.SidebarLayout sidebarContent={<div>Shared Sidebar</div>}>
<h1 className="text-2xl font-semibold text-gray-900">Tutorials</h1>
{postList.map((x) => (
<div className="pb-4">
<h2>{x.title}</h2>
<p>{x.description}</p>
</div>
))}
</Layouts.SidebarLayout>
)
}
@@ -1,3 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@@ -1,55 +0,0 @@
const username = 'supabase'
const postsUrl = `https://dev.to/api/articles?username=${username}`
// Defines a Post returned from the DEV API
export type DevPost = {
id: Number
title: string
description: string
slug: string
url: string
path: string
readable_publish_date: string
published_at: string
tags: string
tag_list: string[]
comments_count: Number
public_reactions_count: Number
positive_reactions_count: Number
published: boolean
first_published_at: string
edited_at: string
user: {
username: string
name: string
profile_image_90: string
cover_image_90: string
profile_image_original: string
cover_image_original: string
location: string
website: string
bio: string
twitter_username: string
github_username: string
dribbble_username: string
path: string
}
organization: {
id: Number
name: string
slug: string
profile_image_90: string
profile_imag: string
}
}
export async function fetchPosts() {
try {
const res = await fetch(postsUrl)
const data: DevPost[] = await res.json()
return data
} catch (err) {
console.log(err)
return []
}
}
@@ -1 +0,0 @@
module.exports = require('config/tailwind.config')
@@ -1,5 +0,0 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
-4
View File
@@ -1,4 +0,0 @@
import * as React from 'react'
export const Button = () => {
return <button>Boop</button>
}