chore: removes the world repo - out of date and requires maintainence. We can reimplement this later from git history

This commit is contained in:
Paul Copplestone committed 2020-11-16 09:11:36 +08:00
1 parent 550be3a9cb
commit 09fbf4d344
7 files changed
-8942

No files matched your search

-15
View File
@@ -1,15 +0,0 @@
## A live code editor connected to an existing PostgreSQL database
![alt text](https://raw.githubusercontent.com/supabase/supabase/master/examples/world/screenshot.png 'screenshot of example')
### installation
`npm install`
### run locally
`npm run dev`
### database schema
[https://github.com/supabase/schemas/tree/master/world](https://github.com/supabase/schemas/tree/master/world)
-7
View File
@@ -1,7 +0,0 @@
require('dotenv').config()
module.exports = {
// env: {
// // Reference a variable that was defined in the .env file and make it available at Build Time
// SOCKET_URL: process.env.SOCKET_URL,
// },
}
-8783
View File
File diff suppressed because it is too large. Load diff
-18
View File
@@ -1,18 +0,0 @@
{
"name": "supabase-world-demo",
"version": "1.0.0",
"scripts": {
"dev": "next -p 8080",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@supabase/supabase-js": "latest",
"dotenv": "^8.2.0",
"next": "latest",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-live": "^2.2.2"
},
"license": "MIT"
}
-47
View File
@@ -1,47 +0,0 @@
import { createClient } from '@supabase/supabase-js'
import { useState, useEffect } from 'react'
import { reactLiveHome } from '../utils//themes'
import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live'
export default class Index extends React.Component {
render() {
const code = `
// I am live code -- edit me :)
function World() {
const [countries, setCountries] = useState();
getCountries = async function() {
this.supabase = createClient('https://world.supabase.co', 'bhiGUYVHdhui7H')
let countries = await this.supabase
.from('countries')
.select("*")
const countryNames = countries.body.map(country => <li key={country.name}>{country.name}</li>)
setCountries(countryNames);
}
useEffect(() => {
getCountries();
}, []);
return (
<div>
{countries}
</div>
)
}
`
return (
<LiveProvider code={code} scope={{ createClient, useState, useEffect }} theme={reactLiveHome}>
<h3>Live Editor:</h3>
<LiveEditor style={{ backgroundColor: 'black' }} />
<LiveError />
<h3>Output:</h3>
<LivePreview style={{ margin: '20px' }} />
</LiveProvider>
)
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

-72
View File
@@ -1,72 +0,0 @@
export const reactLiveHome = {
plain: {
color: '#e7d2ed'
},
styles: [
{
types: ['prolog', 'comment', 'doctype', 'cdata'],
style: {
color: 'hsl(30, 20%, 50%)'
}
},
{
types: ['property', 'tag', 'boolean', 'number', 'constant', 'symbol'],
style: { color: '#f677e1' }
},
{
types: ['attr-name', 'string', 'char', 'builtin', 'insterted'],
style: {
color: 'hsl(75, 70%, 70%)'
}
},
{
types: [
'operator',
'entity',
'url',
'string',
'variable',
'language-css'
],
style: {
color: 'hsl(40, 90%, 70%)'
}
},
{
types: ['deleted'],
style: {
color: 'rgb(255, 85, 85)'
}
},
{
types: ['italic'],
style: {
fontStyle: 'italic'
}
},
{
types: ['important', 'bold'],
style: {
fontWeight: 'bold'
}
},
{
types: ['regex', 'important'],
style: {
color: '#e90'
}
},
{
types: ['atrule', 'attr-value', 'keyword'],
style: {
color: '#f677e1'
}
},
{
types: ['punctuation', 'symbol'],
style: {
opacity: '0.7'
}
}
]
};