Make Slack URL an example and fallback if no href

Signed-off-by: Tejas Kumar <tejask@spotify.com>
This commit is contained in:
Tejas Kumar
2021-06-16 10:15:25 +02:00
committed by Fredrik Adelöw
parent 04ce54adc4
commit 7dacc9b863
2 changed files with 20 additions and 10 deletions
@@ -67,13 +67,17 @@ const Error = ({ slackChannel, error }: EProps) => {
{slackChannel && (
<p>
Please contact{' '}
<a
href={slackChannel.href}
target="_blank"
rel="noopener noreferrer"
>
<u>{slackChannel.name}</u>
</a>{' '}
{slackChannel.href ? (
<a
href={slackChannel.href}
target="_blank"
rel="noopener noreferrer"
>
<u>{slackChannel.name}</u>
</a>
) : (
slackChannel.name
)}{' '}
for help.
</p>
)}
+9 -3
View File
@@ -13,7 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const slackChannel = {
name: '#backstage',
href: 'https://spotify.slack.com/archives/C54P1J36Z',
type SlackChannel = {
name: string;
href?: string;
};
export const slackChannel: SlackChannel = {
name: '#backstage',
href: 'https://slack.com/channels/your-channel',
};