Commit 53c25b26 authored by TheKinrar's avatar TheKinrar Committed by Eugen Rochko

Use new instances.social API (#25)

* Change wizard link to new address

* Use new instances.social API
parent 3c9ad562
......@@ -42,7 +42,7 @@ export default class Wizard extends React.PureComponent {
<div className='wizard-controls'>
<div classname='external-wizard'>
<a className='cta button' target='_blank' href="https://instances.mastodon.xyz">
<a className='cta button' target='_blank' href="https://instances.social">
Help me choose
</a>
</div>
......
import React from 'react';
const WizardRow = ({ instance }) => {
const theme = (instance.info && instance.info.theme) || 'General';
const theme = (instance.info && instance.info.topic) || 'General';
let stabilityColor, stabilityLabel,
populationColor, populationLabel;
......
import axios from 'axios';
const INSTANCES_API_TOKEN = 'JEzPe4Ff5c5WA7k4IP5tx0rJMDzEMFxhmXXZvBG4LFSF0Almf0ewfBAKtbPsqMWx1E0hYe6Wy2Zx6HJHP2LmSwUvKneZVOOnelmFaGB7yNeoCvWUxfM0WyVL0FODQPm7';
export const INSTANCES_FETCH_SUCCESS = 'INSTANCES_FETCH_SUCCESS';
export const SEARCH_VALUE_CHANGE = 'SEARCH_VALUE_CHANGE';
......@@ -9,8 +11,9 @@ export function fetchInstances() {
return;
}
axios.get('https://instances.social/instances.json')
.then(response => dispatch(fetchInstancesSuccess(response.data)));
axios('https://instances.social/api/1.0/instances/list?count=0', {
headers: {'Authorization': `Bearer ${INSTANCES_API_TOKEN}`},
}).then(response => dispatch(fetchInstancesSuccess(response.data.instances)));
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment